Skip to content

fix(date-picker): invoke markForCheck() on overlay open/close to prevent NG0100 in zoneless apps - 21.2.x#17307

Merged
kacheshmarova merged 1 commit into
21.2.xfrom
bpachilova/date-picker-ng0100-17305-21.2.x
Jun 3, 2026
Merged

fix(date-picker): invoke markForCheck() on overlay open/close to prevent NG0100 in zoneless apps - 21.2.x#17307
kacheshmarova merged 1 commit into
21.2.xfrom
bpachilova/date-picker-ng0100-17305-21.2.x

Conversation

@ddaribo

@ddaribo ddaribo commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Closes #17305

Description

Invokes cdr markForCheck in the overlay service's opening and closing callbacks after the internal _collapsed member has been changed.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

IgxDatePicker

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI review requested due to automatic review settings June 2, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an ExpressionChangedAfterItHasBeenCheckedError (NG0100) occurring when toggling the IgxDatePicker calendar overlay in zoneless Angular apps by ensuring change detection is scheduled after _collapsed is updated during overlay open/close lifecycle callbacks.

Changes:

  • Invoke ChangeDetectorRef.markForCheck() after _collapsed is updated in overlay opening and closed handlers.
  • Update unit-test mocks to include markForCheck on the ChangeDetectorRef spy.
  • Add a dedicated zoneless unit test reproducing issue #17305 and asserting no NG0100 is thrown on close.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
projects/igniteui-angular/date-picker/src/date-picker/date-picker.component.ts Schedules CD after overlay open/close state changes to prevent NG0100 in zoneless scenarios.
projects/igniteui-angular/date-picker/src/date-picker/date-picker.component.spec.ts Adds a zoneless regression test and updates the CDR spy to support markForCheck().

@ddaribo ddaribo linked an issue Jun 2, 2026 that may be closed by this pull request
@ddaribo ddaribo added the ❌ status: awaiting-test PRs awaiting manual verification label Jun 2, 2026
@ddaribo ddaribo requested a review from MonikaKirkova June 3, 2026 07:10
@MonikaKirkova MonikaKirkova added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Jun 3, 2026
@kacheshmarova kacheshmarova merged commit 31ebe43 into 21.2.x Jun 3, 2026
6 checks passed
@kacheshmarova kacheshmarova deleted the bpachilova/date-picker-ng0100-17305-21.2.x branch June 3, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📅 date-picker version: 21.2.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IgxDatePicker throws NG0100 in zoneless apps

4 participants